package com.weixin.controller;


import com.weixin.entity.Role;
import com.weixin.service.IRoleService;
import com.weixin.uitl.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author gpf
 * @since 2018-12-24
 */
@RestController
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private IRoleService roleService;

    @GetMapping("/list")
    public R listAll(){
        List<Role> roleList = roleService.list();

        return R.ok().put("roleList",roleList);
    }

}
